import Vue from 'vue'
import App from './App.vue'

import router from './router'

Vue.config.productionTip = false
// import '@/utils/request'
//引入全局样式
import './assets/reset.css'
//引入轮播图组件
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
import 'swiper/css/swiper.min.css'
//注册全局组件
Vue.component('Swiper', Swiper);
Vue.component('SwiperSlide', SwiperSlide)
//引入仓库
import store from './store'

//引入element-UI组件库
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

//路由鉴权文件:全局导航守卫判断
// import '@/permisstion';

//引入全部的请求方法
import * as http from '@/api';

//创建vm
new Vue({
  render: h => h(App),
  router,
  store,
  beforeCreate() {
    //Vue.prototype.xxx->只要是VC都可以使用
    Vue.prototype.$bus = this;
    //把全部的请求方法挂载到原型对象身上
    Vue.prototype.$http = http;
  }
}).$mount('#app')
